/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package csvconvertor;

import java.io.FileNotFoundException;
import java.io.IOException;

/**
 *
 * @author sajin
 */
public class Main {
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException, IOException {
        // TODO code application logic here
        CSVReader reader = new CSVReader("/home/sajin/contact.list");

        CSVWriter writer = new CSVWriter("/home/sajin/contact.csv");

        writer.writeHeaderFields(reader.getHeaderFields());

        String[] fields;

	while ( ( fields = reader.getFields() ) != null )
            writer.writeFields(fields);
    }

}
